import axios from 'axios'

export const getModels = (page = 1, limit = 20) => {
	return axios.get('/admin/models', { params: { page, limit } })
		.then((response) => Promise.resolve(response.data.result))
}

export const addCompleteModel = (params) => {
	return axios.post('/admin/model/complete', params)
		.then((response) => Promise.resolve(response.data.result))
}

export const getCompleteModel = (id) => {
	return axios.get('/admin/model/' + id + '/complete')
		.then((response) => Promise.resolve(response.data.result))
}
